package com.slm.report.di;

import androidx.lifecycle.ViewModelProvider;

import com.slm.report.state.StudentInfoViewModel;
import com.slm.report.ui.StudentInfoActivity;

import dagger.Module;
import dagger.Provides;

/**
 * @ProjectName: My Application
 * @Package: com.slm.report.di
 * @ClassName: StudentInfoDaggerModule
 * @Description: java类作用描述
 * @Author: 王丹丹
 * @CreateDate: 2020/6/2 23:08
 * @UpdateUser: 更新者
 * @UpdateDate: 2020/6/2 23:08
 * @UpdateRemark: 更新说明
 * @Version: 1.0
 */
@Module
public class StudentInfoActivityDaggerModule {
    @Provides
    public StudentInfoViewModel provideViewModel(StudentInfoActivity activity) {
        ViewModelProvider mActivityProvider = new ViewModelProvider(activity, new ViewModelProvider.NewInstanceFactory());
        return mActivityProvider.get(StudentInfoViewModel.class);
    }
}
